package com.backstage.entity;

/**
* 
* 项目名称：dwwl Maven Webapp   
* 类名称：AjaxResult   
* 类描述：封装Ajax结果,所有Ajax请求返回类型   
* 创建人：KelvinNg   
* 创建时间： 2017年2月13日   
* 修改人：KelvinNg   
* 修改时间： 2017年2月13日   
* @version 1.0
* 
*/
public class AjaxResult {
	
	/** 返回结果 */
	private boolean success;
	/** 返回信息 */
	private String message;
	/** 返回数据 */
	private Object data;
	/** 返回错误编号 */
	private Integer errorCode;

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
	/**  
	 * @Title:  getErrorCode <BR>  
	 * @Description: please write your description <BR>  
	 * @return: Integer <BR>  
	 */
	public Integer getErrorCode() {
		return errorCode;
	}

	/**
	 * @param errorCode the errorCode to set
	 */
	public void setErrorCode(Integer errorCode) {
		this.errorCode = errorCode;
	}

	public AjaxResult(boolean success) {
		super();
		this.success = success;
	}

	public AjaxResult(boolean success, String message) {
		super();
		this.success = success;
		this.message = message;
	}
	
	public AjaxResult(boolean success, Integer errorCode) {
		super();
		this.success = success;
		this.errorCode = errorCode;
	}
	
	public AjaxResult(boolean success, Object data) {
		super();
		this.success = success;
		this.data = data;
	}

	public AjaxResult(boolean success, String message, Object data) {
		super();
		this.success = success;
		this.message = message;
		this.data = data;
	}
}
